<%= render "docs/_header.html", conn: @conn, page: @page %>

<%= doc_prose do %>
    <p class="lead">In Azimutt, database design is made through a dedicated language called <a href={Routes.website_path(@conn, :aml)}>AML</a>.</p>
    <p>Here is how it looks:</p>
    <pre><code class="hljs aml">users
  id uuid pk
  name varchar
  email varchar unique
  role user_role(admin, guest)=guest

posts
  id uuid pk
  title varchar
  content text | in markdown
  created_at timestamp=`now()`
  created_by uuid -> users(id) # inline relation
</code></pre>
    <p>We believe it's really the best UX any tool can offer as it allows you to type as fast as you can, use copy/paste, find/replace, code generation, versioning and more...</p>
    <p>
        We even released a <a href={Azimutt.config(:vscode_extension_url)} target="_blank" rel="noopener">VS Code extension</a> for it,
        giving you syntax highlighting, inline error reporting, global rename and even smart suggestions on top of native VS Code features.
        It will continue to evolve, and it's clearly the best way today to write AML.
    </p>
    <p>
        To use it in Azimutt, just create a new source and select AML:
        <img src={Routes.static_path(@conn, "/images/doc/new-source-aml.png")} alt="New source AML">
    </p>
    <p>You can also <a href={Routes.website_path(@conn, :convert, "aml", "json")} target="_blank" rel="noopener noreferrer">try it live with a powerful editor</a> in the converters.</p>
    <p>Now, let's have a look to full specification:</p>
<% end %>

<%= render "docs/_footer.html", conn: @conn, page: @page, prev: @prev, next: @next %>
